package parent.cloud.order;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

@SpringBootApplication
@EnableEurekaClient
public class OrderApplication {
    public static void main(String[] args) {
        SpringApplication.run(OrderApplication.class, args);
    }

    // RestTemplate是spring提供的用于访问rest服务的客户端实例，提供了多种用于访问http服务的方法
    @Bean
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }
}
